package Apoio;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Arquivo {

	public static void grava(String destino, int id, String s) {
		try {
			BufferedWriter br = new BufferedWriter(new FileWriter(new File(
					destino + id)));
			br.write(s);
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void atualiza(String destino, int id, String s) {

		try {
			BufferedWriter out = new BufferedWriter(new FileWriter(
					destino + id, true));
			out.write(s);
			out.newLine();
			out.close();

		} catch (IOException u) {
			u.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
}
